//========encoding:utf-8=========
/*
 * @describe:  三目运算符
 * @author:mhao
 * @copyright:chinasoft.cn
 * @date:2020年3月23日   下午10:51:02
 */
package edu.chinasoft.handler;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import edu.chinasoft.domain.JsonUser;

@Controller("jSONHandler")
@RequestMapping("/jSONHandler")
public class JSONHandler {
	@RequestMapping(value="/json01.do",method=RequestMethod.POST,produces="application/json;charset=utf-8")
	 public  @ResponseBody JsonUser method01(@RequestBody JsonUser user) {
		System.out.println(user.getName()+":"+user.getPassword());
		user.getPassword();
		user.setName(user.getName()+"1");
		user.setPassword(user.getPassword()+"1");
		return user;
	// TODO Auto-generated method stub

	 }
}
